/**
 * 试剂相关请求
 */
import { GET, POST } from "./xhr";

// 请求所有化学试剂
export const fetchReagentList = async (data: any) => await POST("/api/reagent/reagentlist", data);

// 请求用户化学试剂列表
export const fetchUserReagentList = async (data: any) => await POST("/api/reagent/userreagentlist", data);

// 新增化学试剂
export const fetchAddReagent = async (data: any) =>
  await POST("/api/reagent/addreagent", data);

export const fetchAddUserReagent = async (data: any) =>await POST("/api/reagent/adduserreagent", data);

// 编辑化学试剂
export const fetchEditReagent = async (data: any) => await POST("/api/reagent/updatereagent", data);
export const fetchEditUserReagent = async (data: any) => await POST("/api/reagent/updateuserreagent", data);

// 删除化学试剂
export const fetchDelReagent = async (data: any) => await POST("/api/reagent/delreagent", data);

export const fetchDelUserReagent = async (data: any) => await POST("/api/reagent/deluserreagent", data);

// 获取所有化学试剂列表
export const fetchAllReagent = async () => await GET("/api/reagent/allreagent");

// 导入化学试剂请求
export const fetchImportReagent = async (data: any) => await POST("/api/reagent/import", data);
// export const fetchImportReagent = async (data: any) => await POST("/api/reagent/import", data);

// 搜索化学试剂
export const fetchSearchReagent = async (data: any) => await POST("/api/reagent/search", data);
export const fetchSearchUserReagent = async (data: any) => await POST("/api/reagent/searchuser", data);

// 根据Cas搜索化学试剂
export const fetchReagentInfoByCas = async (data: any) => await POST("/api/reagent/searchbycas", data);

// 根据id搜索化学试剂
export const fetchReagentInfoById = async (data: any) => await POST("/api/reagent/searchbyid", data);

// 导入Casno化学试剂请求
export const fetchImportCasReagent = async (data: any) => await POST("/api/reagent/importbycas", data);